﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using quanlynhasach.Linksql;

namespace quanlynhasach
{
    public partial class frmInfoNV : Form
    {
        Nhanviensql nvsql = new Nhanviensql();
        public frmInfoNV()
        {
            InitializeComponent();
        }

        private void frmInfoNV_Load(object sender, EventArgs e)
        {
            DateTime dt = new DateTime();
            this.Dock = DockStyle.Fill;
            DataTable nv = new DataTable();
            nv = nvsql.getNV(frmMain.user);
            label11.Text = nv.Rows[0]["MaNV"].ToString();
            label12.Text = nv.Rows[0]["TenNV"].ToString();
            label19.Text = nv.Rows[0]["GioiTinh"].ToString();
            dt = DateTime.Parse(nv.Rows[0]["NgaySinh"].ToString());
            label16.Text = dt.ToString("dd/MM/yyyy");
            label18.Text = nv.Rows[0]["SoCMND"].ToString();
            textBox1.Text = nv.Rows[0]["DiaChi"].ToString();
            textBox2.Text = nv.Rows[0]["SoDienThoai"].ToString();
            textBox3.Text = nv.Rows[0]["Email"].ToString();
            label17.Text = nv.Rows[0]["Loai"].ToString();
            pictureBox1.ImageLocation = nv.Rows[0]["Anh"].ToString();
        }
    }
}
